package tgc.edu.yzy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.EimAdmin;
import tgc.edu.yzy.entity.EimUser;
import tgc.edu.yzy.repostory.UserRepository;

@Service
public class UserService extends CommonService<EimUser, Integer>{
	@Autowired
	private UserRepository userdao;

	public Page<EimUser> findByEimadmins(Pageable pageable, EimAdmin id) {
		return userdao.findByEimadmins(pageable,id);
	}

	public Page<EimUser> findByEimadmins(Specification<EimUser> buildSpec, Pageable pageable, EimAdmin id) {
		return userdao.findByEimadmins(buildSpec,pageable,id);
	}

	public List<EimUser> findByEimadmins(EimAdmin find) {
		return userdao.findByEimadmins(find);
	}

	public long countByEimadmins(EimAdmin findById) {
		// TODO Auto-generated method stub
		return userdao.countByEimadmins(findById);
	}

	
	

}
